RewriteEngine on
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteRule ^ /%1 [NC,L,R]

RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^ %{REQUEST_URI}.php [NC,L]

#Disabling Directory Browse
Options -Indexes

#404 page
ErrorDocument 404 http://localhost/STFMS/404.php


